package com.bawei.model_sevent.Activity.Adapter;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import org.jetbrains.annotations.NotNull;

import java.util.ArrayList;

/**
 * 时间：2021/11/16 10:06.
 * 类名：Fragrment
 * 作用：Model_sevent
 * 作者:张羽_zy
 */
public class FragrmentAdapter extends FragmentPagerAdapter {
    ArrayList<Fragment> fragments;

    public FragrmentAdapter(@NonNull @NotNull FragmentManager fm, ArrayList<Fragment> fragments) {
        super(fm);
        this.fragments = fragments;
    }

    @NonNull
    @NotNull
    @Override
    public Fragment getItem(int position) {
        return fragments.get(position);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }
}
